package collections;

public class RadixTreeNode {
	private String key;
	private RadixTreeNode parent;
	private RadixTreeNode leftChild;
	private RadixTreeNode rightChild;

	public RadixTreeNode() {
	}
	public RadixTreeNode(String key) {
		setKey(key);
	}

	public String getKey() {
		return key;
	}

	public void setKey(String key) {
		this.key = key;
	}

	public RadixTreeNode getParent() {
		return parent;
	}

	public RadixTreeNode getRightChild() {
		return rightChild;
	}

	public void setRightChild(RadixTreeNode rightChild) {
		this.rightChild = rightChild;
		if(rightChild != null)
			rightChild.parent = this;
	}

	public RadixTreeNode getLeftChild() {
		return leftChild;
	}

	public void setLeftChild(RadixTreeNode leftChild) {
		this.leftChild = leftChild;
		if(leftChild != null)
			leftChild.parent = this;
	}
}
